package waal.pc.backend.hub;


public class HubEvent {

	private int event;
	private Hub hub;
	
	public HubEvent(int event, Hub hub) {
		this.event = event;
		this.hub = hub;
	}
	
	public int getEvent() {
		return this.event;
	}
	
	public Hub getHub() {
		return this.hub;
	}
	
	public String getEventText() {
		switch(this.event) {
		case 1:
			return "Add new Hub " + this.hub.getNumber();
		case 2:
			return "Remove Hub " + this.hub.getNumber();
		case 3: 
			return "Hub starts Measurment";
		case 4: 
			return "Hub stops Measurment";
		case 5:
			return "Hub "  + this.hub.getNumber() + " change  active TimeBase";
		case 6:
			return "Hub owner change";
		case 7:
			return "Hub free state change";
		case 8:
			return "Hub "  + this.hub.getNumber() + " change  lowest TimeBase";
		default:
			return "Unkown Event";
		}
	}
	
}
